package cst.a703xmq.zyfypt_703xmq.Fragment;


import android.content.Intent;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import cst.a703xmq.zyfypt_703xmq.Activity.CollectActivity;
import cst.a703xmq.zyfypt_703xmq.Activity.FocusActivity;
import cst.a703xmq.zyfypt_703xmq.R;



/**
 * A simple {@link Fragment} subclass.
 */
public class FragmentMy extends Fragment {

    private Button btn_collect;
    private Button btn_focus;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
                             @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.fragment_my, container, false);

        btn_collect = (Button)view.findViewById(R.id.btn_collect);
        btn_focus = (Button)view.findViewById(R.id.btn_focus);

        btn_collect.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View view)
            {
                Intent intent = new Intent(getActivity(), CollectActivity.class);
                startActivity(intent);
            }
        });
        btn_focus.setOnClickListener(new View.OnClickListener()
        {
            @Override
            public void onClick(View view)
            {
                Intent intent = new Intent(getActivity(), FocusActivity.class);
                startActivity(intent);
            }
        });
        return view;
    }
}